var express = require('express');

var router = express.Router();

const User = require('../models/users')

let data;
//处理通用数据
router.use(function (req, res, next) {
    data = {
        userInfo: req.userInfo,
        categories: [],
    }
    next();
})



router.get('/', function (req, res) {
    console.log('client',data);
    res.render('main/index',data)
})


module.exports = router;